package com.zlp.common;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import com.zlp.common.utils.ExcelUtils;

public class Test {
	
	public static void main(String[] args) throws IOException {
		
		
		// 时间格式转换
		SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
		String SystemDate=df.format(new Date());
		//生成的文件名称
		String fileName = "数据维护版本管理"+SystemDate+".xlsx";
		try {
			fileName=URLDecoder.decode(fileName, "UTF-8");
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		String tempPath =ExcelUtils.getTemplate()+"/templates/bondDetailCarbodyNo.xlsx";
		FileInputStream instream = new FileInputStream(tempPath);
		// 创建工作薄 
		XSSFWorkbook wb = new XSSFWorkbook(instream);
		
		System.err.println("成功！！！");
	}

}
